﻿<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>来加健康服务网</title>
    <meta name="Keywords" content="">
    <meta name="Description" content="">
    <!-- 移动设备支持 -->
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
    <meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
    <meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
    <meta content="no-cache" http-equiv="pragma">
    <meta content="0" http-equiv="expires">
    <meta content="telephone=no, address=no" name="format-detection">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <link type="text/css" rel="stylesheet" href="Public/mobile/js/layer/skin/layer.css?1"/>
  	<link href="Public/mobile/css/reset.css?165" rel="stylesheet" type="text/css">
    <link href="Public/mobile/css/explain.css" rel="stylesheet" type="text/css">
  	<link href="Public/mobile/css/new.css" rel="stylesheet" type="text/css">
  	
    <link href="Public/mobile/css/upload.css" rel="stylesheet" type="text/css">
    <script type="text/javascript">
      function onImageError(obj){
        obj.src="Public/home/images/default.gif";
    }
    </script>
</head>
<body>
<div id="wrap">
	<header class="header">
        		    <a id="btn_common_go_back" class="fhbtn" onClick="javascript:history.back(-1);" href="javascript:;"></a>
        		    <h2>我的消息</h2>
                                                    	</header>
  	
<div>
        <div>
        <img src="Public/home/images/none_message.png" alt="暂无消息" width="100%">
    </div>
                <div class="h80"></div>
    <div class="navbox navbox1" style="height: auto;bottom:3px;box-shadow: none;display: none" id="do_message">
        <a class="common-btn" href="javascript:void (0)" style="width: 45%;float: left;" id="all_checked">全选/反选</a>
        <a class="common-btn" href="javascript:void (0)" style="width: 45%;float: right"  id="del_checked">删除选中</a>
    </div>
</div>
  </div>
<script type="text/javascript">
  	// 定义一些常量
	var __public='/Public';
    //访问入口类型，值有：weixin微信,normal普通浏览器
	var __access_type__="normal";
	var __indexUrl__="/";//默认的首页地址,即当返回到顶层时的地址
  var __root__="/";//根目录地址
  var __appId = null;
  var __timestamp = null;
  var __nonceStr = null;
  var __signature = null;
  if(__access_type__ == 'weixin'){
      // 定义一些常量
      __appId = "";              // 必填，公众号的唯一标识
      __timestamp = "";  // 必填，生成签名的时间戳
      __nonceStr = "";           // 必填，生成签名的随机串
      __signature = "";  // 必填，签名，见附录1
  }
</script>
<script type="text/javascript" src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="Public/mobile/js/layer/layer.js?1"></script> 
<script type="text/javascript" src="Public/mobile/js/common.js?5"></script>
  	
<script>
    $(function(){
        var click_flag=1;
        $(document).on(eventMap("click"),"#edit_a",function(){
            var flag=false
            $('#do_message').toggle();
            if($('#do_message').css('display')!='none')
                flag=true;
            if(flag) {
                $('.jd-list').addClass("jd-list_zt");

                var as=  $('.jd-list label a');
                as.attr("href", 'javascript:void(0);');
                $(this).text('取消');
            }
            else {
                $('.jd-list').removeClass("jd-list_zt");
               location.replace(location.href);
            }
        });

        //全选、反选
        $(document).on(eventMap("click"),"#all_checked",function(){
            var checkes=$(".jd-list :input[type='checkbox']");
            $.each(checkes,function(){
                $(this).prop('checked',! $(this).prop("checked"))
            });
        });


        $(document).on(eventMap("click"),"#del_checked",function(){
            if(click_flag==0){
                return;
            }
            var checkes= $('.jd-list :input[type="checkbox"]:checked')
            var ids=''

            $.each(checkes,function(){
                ids+=$(this).val()+',';
            })
            ids=ids.substring(0,ids.length-1);

            if(ids==null||ids==''){
                layer.open({
                    content:'请选择要删除的消息',
                    time:1
                });
                return;
            }
            $.ajax({
                type:"get",
                url:'/Member/del_message',
                dataType:'json',
                data:{"ids":ids},
                success:function(res){
                    layer.open({
                        content:res.msg,
                        end:function(){
                            location.replace(location.href);
                        }
                    })
                }
            });
            click_flag=0;
        })
    });

    function checked_check(e){
        var ck= $(e).prev(" :input[type='checkbox']");
        ck.prop("checked", !ck.prop("checked"));
    }
</script>
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?7b2b4b745cfe9f106de279f1f705dd6c";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>
</body>
</html>